﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace ProgrammingEducationSystem.Models
{
    //学习资料
    public class LearnSource
    {
        public Guid Id { get; set; }

        [Required(ErrorMessage = "资源课程类型Id不可为空")]
        [ForeignKey(nameof(CourseType))]
        public Guid CourseTypeId { get; set; }
        public CourseType CourseType { get; set; }

        [Required(ErrorMessage = "资源地址不可为空")]
        public string Address { get; set; }
    }
}
